//
//  HomeCellItem.swift
//  ParkManage
//
//  Created by Jalon on 9/21/20.
//  Copyright © 2020 diligrp. All rights reserved.
//

import UIKit

class HomeCellItem {
    var id: Int
    var title: String
    var image: UIImage
    var bgImage: UIImage
    var navigator: String
    
    init(id: Int, title: String, image: UIImage, bgImage: UIImage, navigator: String) {
        self.id = id
        self.title = title
        self.image = image
        self.bgImage = bgImage
        self.navigator = navigator
    }
    
    static func createHomeCellItem() -> [HomeCellItem] {
        var homeItems: [HomeCellItem] = []
        
        homeItems.append(
            HomeCellItem(
                id: 0,
                title: "通行证审核",
                image: R.image.user_avatar()!,
                bgImage: R.image.blue_bg()!,
                navigator: HomeURL.passAudit.path
            )
        )
        homeItems.append(
            HomeCellItem(
                id: 1,
                title: "转离场审核",
                image: R.image.user_avatar()!,
                bgImage: R.image.blue_bg()!,
                navigator: HomeURL.passAudit.path
            )
        )
        
        homeItems.append(
            HomeCellItem(
                id: 2,
                title: "进厅超时",
                image: R.image.user_avatar()!,
                bgImage: R.image.blue_bg()!,
                navigator: HomeURL.enterHallTimeout.path
            )
        )
        
        homeItems.append(
            HomeCellItem(
                id: 3,
                title: "转离场超时",
                image: R.image.user_avatar()!,
                bgImage: R.image.blue_bg()!,
                navigator: HomeURL.departureTimeout.path
            )
        )
        
        homeItems.append(
            HomeCellItem(
                id: 4,
                title: "价格确认",
                image: R.image.user_avatar()!,
                bgImage: R.image.blue_bg()!,
                navigator: HomeURL.priceConfirmation.path
            )
        )
        
        return homeItems
    }
        
}
